﻿@{
string connString =  System.Configuration.ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
MySql.Data.MySqlClient.MySqlConnection connection = new MySql.Data.MySqlClient.MySqlConnection(connString);

string selectQueryString = "SELECT name FROM db.hosts;"; 

MySql.Data.MySqlClient.MySqlCommand command = new MySql.Data.MySqlClient.MySqlCommand(selectQueryString, connection);
connection.Open();

MySql.Data.MySqlClient.MySqlDataReader reader = command.ExecuteReader();
}

<!DOCTYPE html>

<html lang="pl">
    <head>
        <meta charset="utf-8" />
        <title>Add new host</title>
        <link href="Images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <link rel="stylesheet" type="text/css" href="Shared/styles.css">
    </head>
    <body>
        <form action="Add.cshtml" style="color: #fff; font-family: 'Segoe UI'" method="post">
            Name: <input type="text" name="name"><br>
            Hardware ethernet: <input type="text" name="hardware_ethernet"><br>
            Fixed address: <input type="text" name="fixed_address"><br>
            Subnet: <input type="text" name="subnet"><br>
            <input type="hidden" value="hosts" name="from">
            <input type="submit" value="Dodaj">
        </form>
    </body>
</html>
